package com.fhmoralles.senha.dominio;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "fila")
public class Fila  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7820118736897449116L;
	
	@Id
	@Column(name = "id", nullable = false, insertable = true, updatable = false)
	private Integer id;
	
	@Column(name = "data", nullable = false, insertable = true, updatable = false)
	@Temporal(value = TemporalType.DATE)
	private Date data;
	
	@Column(name = "hora", nullable = false, insertable = true, updatable = false)
	@Temporal(value = TemporalType.TIME)
	private Date hora;
	
	@Column(name = "vaga", nullable = false, insertable = true, updatable = false)
	private Integer vaga;

	@Column(name = "sequencia", nullable = false, insertable = true, updatable = false)
	private Integer sequencia;

	@Column(name = "status", nullable = false, insertable = true, updatable = true, length = 10)
	private String status;

	@Column(name = "atendente", nullable = false, insertable = true, updatable = false)
	private Integer atendente;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}

	public Date getHora() {
		return hora;
	}

	public void setHora(Date hora) {
		this.hora = hora;
	}

	public Integer getVaga() {
		return vaga;
	}

	public void setVaga(Integer vaga) {
		this.vaga = vaga;
	}

	public Integer getSequencia() {
		return sequencia;
	}

	public void setSequencia(Integer sequencia) {
		this.sequencia = sequencia;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getAtendente() {
		return atendente;
	}

	public void setAtendente(Integer atendente) {
		this.atendente = atendente;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Fila other = (Fila) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

}
